package com.starlink.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import org.springframework.data.domain.Pageable;
import com.starlink.model.domain.MallPeripheryOrderDO;
import com.starlink.model.request.MallPeripheryOrderRequest;
import com.starlink.model.vo.MallPeripheryOrderVO;

import java.util.List;

/**
 * @author zhanghong
 */
public interface MallPeripheryOrderService extends IService<MallPeripheryOrderDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
    MallPeripheryOrderVO getByKey(long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfo<MallPeripheryOrderVO> pageQuery(Pageable pageable,MallPeripheryOrderRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<MallPeripheryOrderVO> listQuery(MallPeripheryOrderRequest request);
    /**
     * 新增
     * @param request
     * @return
     */
    Boolean add(MallPeripheryOrderRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(MallPeripheryOrderRequest request);
    /**
     * 根据主键删除
     * @param ids
     * @return
     */
    Boolean deleteDOByIds(String ids);

    /**
     * 新增订单并返回订单ID
     * @param peripheryOrderRequest
     * @return
     */
    Long insertDO(MallPeripheryOrderRequest peripheryOrderRequest);

}
